Repository navigation
fix: answer git var for a squash message instead of logging it as unknown - #8
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found on the first real squash merge (pipe-test PR 4, message
bad message). The on-merge check gave the right verdict, but the log also had a warning:Before
For a message that is not committed yet, the CLI asks
git var GIT_AUTHOR_IDENTwho the commit will be by. For a squash merge that is whoever presses Merge, and Bitbucket does not say: the merge check event carries only the workspace, repository, pull request, trigger and merge properties.After: the shim answers
git var GIT_AUTHOR_IDENTandGIT_COMMITTER_IDENTas git does with no identity configured (fatal: unable to auto-detect email address). The verdict is the same as before; the warning is gone, so the warning stays meaningful for git commands that really are unknown.A new test runs the squash path (
.commit-check-message -m -n -e -b,ai_attribution = "forbid"). It expects no unknown git commands, CC001 to fail, and CC017 (AI author) not to fail. Without the fix it fails withunsupported: ['git var GIT_AUTHOR_IDENT'].164 tests pass, coverage 100%, lint clean.